package com.icehelper.hades.base.exception;


/**
 * 用来快速返回失败的异常类。
 * 该异常不会收集堆栈信息。
 * 携带的默认的错误码是 CommonErrorCode.SERVER_BUSY 。
 */
public class HadesFastFailException extends HadesErrorCodeException{

  private static final long serialVersionUID = 6368013986438293591L;

  public HadesFastFailException(String msg) {
    this(null, msg);
  }

  public HadesFastFailException(IErrorCode errorCode) {
    this(errorCode, errorCode.msg());
  }

  public HadesFastFailException(IErrorCode errorCode, String message) {
    super(message, null, false, false, errorCode == null ? CommonErrorCode.SERVER_BUSY : errorCode);
  }
}
